/*
Emma Cohen	
Proposal Title: Social Class, College Debt, and the Purpose of College

HYPOTHESES

Stated-Hyp1: "the public may be more likely to recommend academic majors for students already in possession of elite cultural capital—i.e., students from higher-SES backgrounds." (p.3)

	Test-Hyp1: Recommendation for academic majors will be higher for upper-class vs. working class students.

Stated-Hyp2: "The public may be more likely to recommend applied majors for indebted students" (p. 3)

	Test-Hyp2: Recommendation for applied majors will be higher for indebted students vs. non-indebted students

Stated-Hyp3: "I expect that the importance of social experiences will be recognized primarily for upper-class students and for students unconstrained by debt" (p. 4)

	Test-Hyp3: Importance of social experiences will be rated higher for upper-class vs. working class students.
	
	Test-Hyp4: Importance of social experiences will be rated higher for un-indebted vs. indebted students. 

Stated-Hyp4: "I expect that the public will be more likely to recommend female-dominated majors for female students, and male-dominated majors for male students"

	Test-Hyp5: Recommendation for female-dominated majors will be higher for women vs. men students.
	Test-Hyp6: Recommendation for male-dominated majors will be lower for women vs. men students.
	
********************************************************************************
NOTES:

* meeting with on 3-8-2021

-There are 17 outcome variables. Combining these into scales. 

-The hypotheses are not spelt out. We took all statement where any “expectation” 
was mentioned and turned them into stated hypotheses. 

-One set of hypotheses pertains to female and male dominated majors, but the 
proposal doesn’t mention which majors are male/female dominated for all except 
2 of the majors (out of 8 total majors mentioned). We decided to go with nursing 
as F and CS as M, as specified by the author.
Also, based on our own knowledge of these fields, we treat physics as male 
dominated; english as female dominated.
*/

clear all
use "Cohen1099.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

tab VIGNOE
/*
1=Saw vignette 1 and Q9
2= Saw vignette 1 and Q19
3= Saw vignette 2 and Q9
4= Saw vignette 2 and Q19
5= Saw vignette 3 and Q9
6= Saw vignette 3 and Q19
7= Saw vignette 4 and Q9
8= Saw vignette 4 and Q19
9= Saw vignette 5 and Q9
10= Saw vignette 5 and Q19
11= Saw vignette 6 and Q9
12= Saw vignette 6 and Q19
13= Saw vignette 7 and Q9
14= Saw vignette 7 and Q19
15= Saw vignette 8 and Q9
16= Saw vignette 8 and Q19
17= Saw vignette 9 and Q9
18= Saw vignette 9 and Q19
19= Saw vignette 10 and Q9
20= Saw vignette 10 and Q19
21= Saw vignette 11 and Q9
22= Saw vignette 11 and Q19
23= Saw vignette 12 and Q9
24= Saw vignette 12 and Q19

see quex and proposal for more details
*/

	* vignette number
	gen vignette= .
	replace vignette=1 if VIGNOE==1|VIGNOE==2
	replace vignette=2 if VIGNOE==3|VIGNOE==4
	replace vignette=3 if VIGNOE==5|VIGNOE==6
	replace vignette=4 if VIGNOE==7|VIGNOE==8
	replace vignette=5 if VIGNOE==9|VIGNOE==10
	replace vignette=6 if VIGNOE==11|VIGNOE==12
	replace vignette=7 if VIGNOE==13|VIGNOE==14
	replace vignette=8 if VIGNOE==15|VIGNOE==16
	replace vignette=9 if VIGNOE==17|VIGNOE==18
	replace vignette=10 if VIGNOE==19|VIGNOE==20
	replace vignette=11 if VIGNOE==21|VIGNOE==22
	replace vignette=12 if VIGNOE==23|VIGNOE==24
	tab vignette

* Class
	recode vignette (1/3=0) (4/6=1) (7/9=0) (10/12=1), gen(vig_upperclass)
	tab vig_upperclass

* indebtedness
	lab def debt 0 "0 no info" 1 "1 has debt" 2 "2 no debt"
	recode vignette (1=0) (2=1) (3=2) ///
	(4=0) (5=1) (6=2) ///
	(7=0) (8=1) (9=2) ///
	(10=0) (11=1) (12=2) ///
	, gen(vig_debt)
	lab val vig_debt debt
	tab vig_debt

* gender
	recode vignette (1/6=0) (7/12=1), gen(vig_female)
	tab vig_female
	
* OUTCOME MEASURES

* recommended majors
	// recode missing
	foreach var in Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 {
		replace `var'=. if `var'>6
		tab `var'
	}

	* classifying majors by the typology in the proposal (p. 7)
			
		* academic STEM fields (physics and biology)
		gen acad_stem= Q5+Q4
		tab acad_stem	
			
		* academic non-STEM (history and English)
		gen acad_nonstem = Q1+Q6
		tab acad_nonstem	
			
		* applied STEM (computer science and nursing)
		gen app_stem=Q7+Q2	
		tab app_stem	
			
		*applied non-STEM (accounting and communications)
		gen app_nonstem = Q3+Q8	
		tab app_nonstem	
		
		* all stem majors
		gen stem_majors = acad_stem + app_stem

		* all academic majors
		gen academic_majors=acad_stem + acad_nonstem
		
		* all applied majors
		gen applied_majors = app_stem + app_nonstem
		
		* female dominated majors
		/* it is unclear which majors are female-dominated; but author indicates in footnote 5 that within applied STEM, nursing is supposed to be female dominated. 
		*/
		gen femaledom_major=Q2+Q5
		gen maledom_major=Q7+Q6
		
		
		
* importance of college experiences
	// recode missing
	foreach var in Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 {
		replace `var'=. if `var'>9
		tab `var'
	}
	
	* higher values indicate decline importance; recode so higher values indicate more importance
	foreach var in Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 {
		gen rev`var'=10-`var'
		tab rev`var'
	}	
		
* human captial activities
	/* I include five academic and human capital activities: 
	career development; 
	becoming familiar with important works of history, philosophy, literature, and art; 
	gaining exposure to diverse viewpoints and cultures; 
	getting good grades; 
	and making connections with professors. 
*/
	gen humancapital = revQ11+revQ13+revQ15+revQ16+revQ18
	tab humancapital

* social experiences
 	/*I also include four social experiences: having fun; making friends; dating and romantic relationships;and getting involved in campus activities. 
	*/

	gen socexperience= revQ10 + revQ12+revQ14+revQ17
	tab socexperience
	
********************************************************************************

* ANALYSIS

*Test-Hyp1: Recommendation for academic majors will be higher for upper-class vs. working class students.
	reg academic_majors i.vig_upperclass
	// reject. 0.199
	tess 1.vig_upperclass +, init(Cohen1099) bonf(2)
	
*Test-Hyp2: Recommendation for applied majors will be higher for indebted students vs. non-indebted students
	reg applied_majors ib2.vig_debt if vig_debt!=0 
	// reject. 0.700
	tess 1.vig_debt +, bonf(2)

*Test-Hyp3: Importance of social experiences will be rated higher for upper-class vs. working class students.
	reg socexperience i.vig_upperclass 
	// reject. 0.510
	tess 1.vig_upperclass +, bonf(2)
	
*Test-Hyp4: Importance of social experiences will be rated higher for un-indebted vs. indebted students. 
	reg socexperience ib2.vig_debt if vig_debt!=0 
	// reject. 0.348
	tess 1.vig_debt +, bonf(2)
	
*Test-Hyp5: Recommendation for female-dominated majors will be higher for women vs. men students.
	reg femaledom_major i.vig_female 
	// do not reject. 0.000
	tess 1.vig_female +, bonf(2)
	
*Test-Hyp6: Recommendation for male-dominated majors will be lower for women vs. men students.
	reg maledom_major i.vig_female 
	// reject. 0.465
	tess 1.vig_female -,	bonf(2)
